
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_CN">
  <head>
    <meta charset="utf-8" />
    <title>calendar --- 日历相关函数 &#8212; Python 3.7.8 文档</title>
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/translations.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="在 Python 3.7.8 文档 中搜索"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="关于这些文档" href="../about.html" />
    <link rel="index" title="索引" href="../genindex.html" />
    <link rel="search" title="搜索" href="../search.html" />
    <link rel="copyright" title="版权所有" href="../copyright.html" />
    <link rel="next" title="collections --- 容器数据类型" href="collections.html" />
    <link rel="prev" title="datetime --- 基本的日期和时间类型" href="datetime.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/3/library/calendar.html" />
    
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
    
    
    
    <style>
      @media only screen {
        table.full-width-table {
            width: 100%;
        }
      }
    </style>
 

  </head><body>
  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>导航</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="总目录"
             accesskey="I">索引</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python 模块索引"
             >模块</a> |</li>
        <li class="right" >
          <a href="collections.html" title="collections --- 容器数据类型"
             accesskey="N">下一页</a> |</li>
        <li class="right" >
          <a href="datetime.html" title="datetime --- 基本的日期和时间类型"
             accesskey="P">上一页</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">3.7.8 Documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >Python 标准库</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="datatypes.html" accesskey="U">数据类型</a> &#187;</li>
    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="快速搜索" type="text" name="q" />
          <input type="submit" value="转向" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-calendar">
<span id="calendar-general-calendar-related-functions"></span><h1><a class="reference internal" href="#module-calendar" title="calendar: Functions for working with calendars, including some emulation of the Unix cal program."><code class="xref py py-mod docutils literal notranslate"><span class="pre">calendar</span></code></a> --- 日历相关函数<a class="headerlink" href="#module-calendar" title="永久链接至标题">¶</a></h1>
<p><strong>源代码：</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.7/Lib/calendar.py">Lib/calendar.py</a></p>
<hr class="docutils" />
<p>这个模块让你可以输出像 Unix <strong class="program">cal</strong> 那样的日历，它还提供了其它与日历相关的实用函数。 默认情况下，这些日历把星期一当作一周的第一天，星期天为一周的最后一天（按照欧洲惯例）。 可以使用 <a class="reference internal" href="#calendar.setfirstweekday" title="calendar.setfirstweekday"><code class="xref py py-func docutils literal notranslate"><span class="pre">setfirstweekday()</span></code></a> 方法设置一周的第一天为星期天 (6) 或者其它任意一天。 使用整数作为指定日期的参数。 更多相关的函数，参见 <a class="reference internal" href="datetime.html#module-datetime" title="datetime: Basic date and time types."><code class="xref py py-mod docutils literal notranslate"><span class="pre">datetime</span></code></a> 和 <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><code class="xref py py-mod docutils literal notranslate"><span class="pre">time</span></code></a> 模块。</p>
<p>在这个模块中定义的函数和类都基于一个理想化的日历，现行公历向过去和未来两个方向无限扩展。这与 Dershowitz 和 Reingold 的书 &quot;历法计算&quot; 中所有计算的基本日历 -- &quot;proleptic Gregorian&quot; 日历的定义相符合。 ISO 8601标准还规定了 0 和 负数年份。0年指公元前1年， -1年指公元前2年，依此类推。</p>
<dl class="class">
<dt id="calendar.Calendar">
<em class="property">class </em><code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">Calendar</code><span class="sig-paren">(</span><em class="sig-param">firstweekday=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar" title="永久链接至目标">¶</a></dt>
<dd><p>创建一个 <a class="reference internal" href="#calendar.Calendar" title="calendar.Calendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">Calendar</span></code></a> 对象。 <em>firstweekday</em> 是一个整数，用于指定一周的第一天。 <code class="docutils literal notranslate"><span class="pre">0</span></code> 是星期一（默认值），<code class="docutils literal notranslate"><span class="pre">6</span></code> 是星期天。</p>
<p><a class="reference internal" href="#calendar.Calendar" title="calendar.Calendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">Calendar</span></code></a> 对象提供了一些可被用于准备日历数据格式化的方法。 这个类本身不执行任何格式化操作。 这部分任务应由子类来完成。</p>
<p><a class="reference internal" href="#calendar.Calendar" title="calendar.Calendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">Calendar</span></code></a> 类的实例有下列方法：</p>
<dl class="method">
<dt id="calendar.Calendar.iterweekdays">
<code class="sig-name descname">iterweekdays</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.iterweekdays" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个迭代器，迭代器的内容为一星期的数字。迭代器的第一个值与 <a class="reference internal" href="#calendar.firstweekday" title="calendar.firstweekday"><code class="xref py py-attr docutils literal notranslate"><span class="pre">firstweekday</span></code></a> 属性的值一至。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.itermonthdates">
<code class="sig-name descname">itermonthdates</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.itermonthdates" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个迭代器，迭代器的内容为 <em>year</em> 年 <em>month</em> 月(1-12)的日期。这个迭代器返回当月的所有日期 ( <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a>  对象)，日期包含了本月头尾用于组成完整一周的日期。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.itermonthdays">
<code class="sig-name descname">itermonthdays</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.itermonthdays" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个迭代器，迭代器的内容与 <a class="reference internal" href="#calendar.Calendar.itermonthdates" title="calendar.Calendar.itermonthdates"><code class="xref py py-meth docutils literal notranslate"><span class="pre">itermonthdates()</span></code></a> 类似，为 <em>year</em> 年 <em>month</em> 月的日期，但不受 <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a> 范围限制。返回的日期为当月每一天的日期对应的天数。对于不在当月的日期，显示为 <code class="docutils literal notranslate"><span class="pre">0</span></code>。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.itermonthdays2">
<code class="sig-name descname">itermonthdays2</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.itermonthdays2" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个迭代器，迭代器的内容与 <a class="reference internal" href="#calendar.Calendar.itermonthdates" title="calendar.Calendar.itermonthdates"><code class="xref py py-meth docutils literal notranslate"><span class="pre">itermonthdates()</span></code></a> 类似为 <em>year</em> 年 <em>month</em> 月的日期，但不受 <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a> 范围的限制。迭代器中的元素为一个由日期和代表星期几的数字组成的的元组。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.itermonthdays3">
<code class="sig-name descname">itermonthdays3</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.itermonthdays3" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个迭代器，迭代器的内容与 <a class="reference internal" href="#calendar.Calendar.itermonthdates" title="calendar.Calendar.itermonthdates"><code class="xref py py-meth docutils literal notranslate"><span class="pre">itermonthdates()</span></code></a> 类似为 <em>year</em> 年 <em>month</em> 月的日期，但不受 <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a> 范围的限制。迭代器的元素为一个由年，月，日组成的元组。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.itermonthdays4">
<code class="sig-name descname">itermonthdays4</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.itermonthdays4" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个迭代器，迭代器的内容与 <a class="reference internal" href="#calendar.Calendar.itermonthdates" title="calendar.Calendar.itermonthdates"><code class="xref py py-meth docutils literal notranslate"><span class="pre">itermonthdates()</span></code></a> 类似为 <em>year</em> 年 <em>month</em> 月的日期，但不受 <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a> 范围的限制。迭代器的元素为一个由年，月，日和代表星期几的数字组成的元组。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.monthdatescalendar">
<code class="sig-name descname">monthdatescalendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.monthdatescalendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个表示指定年月的周列表。周列表由七个  <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a> 对象组成。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.monthdays2calendar">
<code class="sig-name descname">monthdays2calendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.monthdays2calendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个表示指定年月的周列表。周列表由七个代表日期的数字和代表周几的数字组成的二元元组。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.monthdayscalendar">
<code class="sig-name descname">monthdayscalendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.monthdayscalendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个表示指定年月的周列表。周列表由七个代表日期的数字组成。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.yeardatescalendar">
<code class="sig-name descname">yeardatescalendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">width=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.yeardatescalendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回可以用来格式化的指定年月的数据。返回的值是一个列表，列表是月份组成的行。每一行包含了最多 <em>width</em> 个月(默认为3)。每个月包含了4到6周，每周包含1--7天。每一天使用 <a class="reference internal" href="datetime.html#datetime.date" title="datetime.date"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a> 对象。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.yeardays2calendar">
<code class="sig-name descname">yeardays2calendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">width=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.yeardays2calendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回可以用来模式化的指定年月的数据(与 <a class="reference internal" href="#calendar.Calendar.yeardatescalendar" title="calendar.Calendar.yeardatescalendar"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yeardatescalendar()</span></code></a> 类似)。周列表的元素是由表示日期的数字和表示星期几的数字组成的元组。不在这个月的日子为0。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.Calendar.yeardayscalendar">
<code class="sig-name descname">yeardayscalendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">width=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.Calendar.yeardayscalendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回可以用来模式化的指定年月的数据(与 <a class="reference internal" href="#calendar.Calendar.yeardatescalendar" title="calendar.Calendar.yeardatescalendar"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yeardatescalendar()</span></code></a> 类似)。周列表的元素是表示日期的数字。不在这个月的日子为0。</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="calendar.TextCalendar">
<em class="property">class </em><code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">TextCalendar</code><span class="sig-paren">(</span><em class="sig-param">firstweekday=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.TextCalendar" title="永久链接至目标">¶</a></dt>
<dd><p>可以使用这个类生成纯文本日历。</p>
<p><a class="reference internal" href="#calendar.TextCalendar" title="calendar.TextCalendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">TextCalendar</span></code></a> 实例有以下方法：</p>
<dl class="method">
<dt id="calendar.TextCalendar.formatmonth">
<code class="sig-name descname">formatmonth</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">themonth</em>, <em class="sig-param">w=0</em>, <em class="sig-param">l=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.TextCalendar.formatmonth" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个多行字符串来表示指定年月的日历。<em>w</em> 为日期的宽度，但始终保持日期居中。<em>l</em> 指定了每星期占用的行数。以上这些还依赖于构造器或者 <a class="reference internal" href="#calendar.setfirstweekday" title="calendar.setfirstweekday"><code class="xref py py-meth docutils literal notranslate"><span class="pre">setfirstweekday()</span></code></a> 方法指定的周的第一天是哪一天。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.TextCalendar.prmonth">
<code class="sig-name descname">prmonth</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">themonth</em>, <em class="sig-param">w=0</em>, <em class="sig-param">l=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.TextCalendar.prmonth" title="永久链接至目标">¶</a></dt>
<dd><p>与 <a class="reference internal" href="#calendar.TextCalendar.formatmonth" title="calendar.TextCalendar.formatmonth"><code class="xref py py-meth docutils literal notranslate"><span class="pre">formatmonth()</span></code></a> 方法一样，返回一个月的日历。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.TextCalendar.formatyear">
<code class="sig-name descname">formatyear</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">w=2</em>, <em class="sig-param">l=1</em>, <em class="sig-param">c=6</em>, <em class="sig-param">m=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.TextCalendar.formatyear" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个多行字符串，这个字符串为一个 <em>m</em> 列日历。可选参数 <em>w</em>, <em>l</em>, 和 <em>c</em> 分别表示日期列数， 周的行数， 和月之间的间隔。同样，以上这些还依赖于构造器或者 <a class="reference internal" href="#calendar.setfirstweekday" title="calendar.setfirstweekday"><code class="xref py py-meth docutils literal notranslate"><span class="pre">setfirstweekday()</span></code></a> 指定哪一天为一周的第一天。日历的第一年由平台依赖于使用的平台。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.TextCalendar.pryear">
<code class="sig-name descname">pryear</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">w=2</em>, <em class="sig-param">l=1</em>, <em class="sig-param">c=6</em>, <em class="sig-param">m=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.TextCalendar.pryear" title="永久链接至目标">¶</a></dt>
<dd><p>与 <a class="reference internal" href="#calendar.TextCalendar.formatyear" title="calendar.TextCalendar.formatyear"><code class="xref py py-meth docutils literal notranslate"><span class="pre">formatyear()</span></code></a> 方法一样，返回一整年的日历。</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="calendar.HTMLCalendar">
<em class="property">class </em><code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">HTMLCalendar</code><span class="sig-paren">(</span><em class="sig-param">firstweekday=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.HTMLCalendar" title="永久链接至目标">¶</a></dt>
<dd><p>可以使用这个类生成 HTML 日历。</p>
<p><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLCalendar</span></code> 实例有以下方法：</p>
<dl class="method">
<dt id="calendar.HTMLCalendar.formatmonth">
<code class="sig-name descname">formatmonth</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">themonth</em>, <em class="sig-param">withyear=True</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.HTMLCalendar.formatmonth" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个 HTML 表格作为指定年月的日历。 <em>withyear</em> 为真，则年份将会包含在表头，否则只显示月份。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.HTMLCalendar.formatyear">
<code class="sig-name descname">formatyear</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">width=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.HTMLCalendar.formatyear" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个 HTML 表格作为指定年份的日历。 <em>width</em> (默认为3) 用于规定每一行显示月份的数量。</p>
</dd></dl>

<dl class="method">
<dt id="calendar.HTMLCalendar.formatyearpage">
<code class="sig-name descname">formatyearpage</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">width=3</em>, <em class="sig-param">css='calendar.css'</em>, <em class="sig-param">encoding=None</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.HTMLCalendar.formatyearpage" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个完整的 HTML 页面作为指定年份的日历。 <em>width*(默认为3) 用于规定每一行显示的月份数量。 *css</em> 为层叠样式表的名字。如果不使用任何层叠样式表，可以使用 <a class="reference internal" href="constants.html#None" title="None"><code class="xref py py-const docutils literal notranslate"><span class="pre">None</span></code></a> 。 <em>encoding</em> 为输出页面的编码 (默认为系统的默认编码)。</p>
</dd></dl>

<p><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLCalendar</span></code> 有以下属性，你可以重载它们来自定义应用日历的样式。</p>
<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclasses">
<code class="sig-name descname">cssclasses</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclasses" title="永久链接至目标">¶</a></dt>
<dd><p>一个对应星期一到星期天的 CSS class 列表。默认列表为</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">cssclasses</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;mon&quot;</span><span class="p">,</span> <span class="s2">&quot;tue&quot;</span><span class="p">,</span> <span class="s2">&quot;wed&quot;</span><span class="p">,</span> <span class="s2">&quot;thu&quot;</span><span class="p">,</span> <span class="s2">&quot;fri&quot;</span><span class="p">,</span> <span class="s2">&quot;sat&quot;</span><span class="p">,</span> <span class="s2">&quot;sun&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>可以向每天加入其它样式</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">cssclasses</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;mon text-bold&quot;</span><span class="p">,</span> <span class="s2">&quot;tue&quot;</span><span class="p">,</span> <span class="s2">&quot;wed&quot;</span><span class="p">,</span> <span class="s2">&quot;thu&quot;</span><span class="p">,</span> <span class="s2">&quot;fri&quot;</span><span class="p">,</span> <span class="s2">&quot;sat&quot;</span><span class="p">,</span> <span class="s2">&quot;sun red&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>需要注意的是，列表的长度必须为7。</p>
</dd></dl>

<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclass_noday">
<code class="sig-name descname">cssclass_noday</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclass_noday" title="永久链接至目标">¶</a></dt>
<dd><p>工作日的 CSS 类在上个月或下个月发生。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclasses_weekday_head">
<code class="sig-name descname">cssclasses_weekday_head</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclasses_weekday_head" title="永久链接至目标">¶</a></dt>
<dd><p>用于标题行中的工作日名称的 CSS 类 列表。默认值与 <a class="reference internal" href="#calendar.HTMLCalendar.cssclasses" title="calendar.HTMLCalendar.cssclasses"><code class="xref py py-attr docutils literal notranslate"><span class="pre">cssclasses</span></code></a> 相同。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclass_month_head">
<code class="sig-name descname">cssclass_month_head</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclass_month_head" title="永久链接至目标">¶</a></dt>
<dd><p>月份的头 CSS 类（由 <code class="xref py py-meth docutils literal notranslate"><span class="pre">formatmonthname()</span></code> 使用）。默认值为 <code class="docutils literal notranslate"><span class="pre">&quot;month&quot;</span></code> 。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclass_month">
<code class="sig-name descname">cssclass_month</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclass_month" title="永久链接至目标">¶</a></dt>
<dd><p>某个月的月历的 CSS 类（由 <a class="reference internal" href="#calendar.HTMLCalendar.formatmonth" title="calendar.HTMLCalendar.formatmonth"><code class="xref py py-meth docutils literal notranslate"><span class="pre">formatmonth()</span></code></a> 使用）。默认值为 <code class="docutils literal notranslate"><span class="pre">&quot;month&quot;</span></code> 。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclass_year">
<code class="sig-name descname">cssclass_year</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclass_year" title="永久链接至目标">¶</a></dt>
<dd><p>某年的年历的 CSS 类（由 <a class="reference internal" href="#calendar.HTMLCalendar.formatyear" title="calendar.HTMLCalendar.formatyear"><code class="xref py py-meth docutils literal notranslate"><span class="pre">formatyear()</span></code></a> 使用）。默认值为 <code class="docutils literal notranslate"><span class="pre">&quot;year&quot;</span></code> 。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="calendar.HTMLCalendar.cssclass_year_head">
<code class="sig-name descname">cssclass_year_head</code><a class="headerlink" href="#calendar.HTMLCalendar.cssclass_year_head" title="永久链接至目标">¶</a></dt>
<dd><p>年历的·表头 CSS 类（由 <a class="reference internal" href="#calendar.HTMLCalendar.formatyear" title="calendar.HTMLCalendar.formatyear"><code class="xref py py-meth docutils literal notranslate"><span class="pre">formatyear()</span></code></a> 使用）。默认值为 <code class="docutils literal notranslate"><span class="pre">&quot;year&quot;</span></code> 。</p>
<div class="versionadded">
<p><span class="versionmodified added">3.7 新版功能.</span></p>
</div>
</dd></dl>

<p>需要注意的是，尽管上面命名的样式类都是单独出现的(如： <code class="docutils literal notranslate"><span class="pre">cssclass_month</span></code> <code class="docutils literal notranslate"><span class="pre">cssclass_noday</span></code>), 但我们可以使用空格将样式类列表中的多个元素分隔开，例如：</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;text-bold text-red&quot;</span>
</pre></div>
</div>
<p>下面是一个如何自定义  <code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLCalendar</span></code> 的示例</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">CustomHTMLCal</span><span class="p">(</span><span class="n">calendar</span><span class="o">.</span><span class="n">HTMLCalendar</span><span class="p">):</span>
    <span class="n">cssclasses</span> <span class="o">=</span> <span class="p">[</span><span class="n">style</span> <span class="o">+</span> <span class="s2">&quot; text-nowrap&quot;</span> <span class="k">for</span> <span class="n">style</span> <span class="ow">in</span>
                  <span class="n">calendar</span><span class="o">.</span><span class="n">HTMLCalendar</span><span class="o">.</span><span class="n">cssclasses</span><span class="p">]</span>
    <span class="n">cssclass_month_head</span> <span class="o">=</span> <span class="s2">&quot;text-center month-head&quot;</span>
    <span class="n">cssclass_month</span> <span class="o">=</span> <span class="s2">&quot;text-center month&quot;</span>
    <span class="n">cssclass_year</span> <span class="o">=</span> <span class="s2">&quot;text-italic lead&quot;</span>
</pre></div>
</div>
</dd></dl>

<dl class="class">
<dt id="calendar.LocaleTextCalendar">
<em class="property">class </em><code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">LocaleTextCalendar</code><span class="sig-paren">(</span><em class="sig-param">firstweekday=0</em>, <em class="sig-param">locale=None</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.LocaleTextCalendar" title="永久链接至目标">¶</a></dt>
<dd><p>这个子类 <a class="reference internal" href="#calendar.TextCalendar" title="calendar.TextCalendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">TextCalendar</span></code></a> 可以在构造函数中传递一个语言环境名称，并且返回月份和星期几的名称在特定语言环境中。如果此语言环境包含编码，则包含月份和工作日名称的所有字符串将作为 unicode 返回。</p>
</dd></dl>

<dl class="class">
<dt id="calendar.LocaleHTMLCalendar">
<em class="property">class </em><code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">LocaleHTMLCalendar</code><span class="sig-paren">(</span><em class="sig-param">firstweekday=0</em>, <em class="sig-param">locale=None</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.LocaleHTMLCalendar" title="永久链接至目标">¶</a></dt>
<dd><p>This subclass of <a class="reference internal" href="#calendar.HTMLCalendar" title="calendar.HTMLCalendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLCalendar</span></code></a> can be passed a locale name in the
constructor and will return month and weekday names in the specified
locale. If this locale includes an encoding all strings containing month and
weekday names will be returned as unicode.</p>
</dd></dl>

<div class="admonition note">
<p class="admonition-title">注解</p>
<p>这两个类的 <code class="xref py py-meth docutils literal notranslate"><span class="pre">formatweekday()</span></code> 和 <code class="xref py py-meth docutils literal notranslate"><span class="pre">formatmonthname()</span></code> 方法临时更改dang当前区域至给定 <em>locale</em> 。由于当前的区域设置是进程范围的设置，因此它们不是线程安全的。</p>
</div>
<p>对于简单的文本日历，这个模块提供了以下方法。</p>
<dl class="function">
<dt id="calendar.setfirstweekday">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">setfirstweekday</code><span class="sig-paren">(</span><em class="sig-param">weekday</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.setfirstweekday" title="永久链接至目标">¶</a></dt>
<dd><p>设置每一周的开始(<code class="docutils literal notranslate"><span class="pre">0</span></code> 表示星期一，<code class="docutils literal notranslate"><span class="pre">6</span></code> 表示星期天)。calendar还提供了  <code class="xref py py-const docutils literal notranslate"><span class="pre">MONDAY</span></code>, <code class="xref py py-const docutils literal notranslate"><span class="pre">TUESDAY</span></code>, <code class="xref py py-const docutils literal notranslate"><span class="pre">WEDNESDAY</span></code>, <code class="xref py py-const docutils literal notranslate"><span class="pre">THURSDAY</span></code>, <code class="xref py py-const docutils literal notranslate"><span class="pre">FRIDAY</span></code>, <code class="xref py py-const docutils literal notranslate"><span class="pre">SATURDAY</span></code> 和 <code class="xref py py-const docutils literal notranslate"><span class="pre">SUNDAY</span></code> 几个常量方便使用。例如，设置每周的第一天为星期天</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">calendar</span>
<span class="n">calendar</span><span class="o">.</span><span class="n">setfirstweekday</span><span class="p">(</span><span class="n">calendar</span><span class="o">.</span><span class="n">SUNDAY</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="calendar.firstweekday">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">firstweekday</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#calendar.firstweekday" title="永久链接至目标">¶</a></dt>
<dd><p>返回当前设置的每星期的第一天的数值。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.isleap">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">isleap</code><span class="sig-paren">(</span><em class="sig-param">year</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.isleap" title="永久链接至目标">¶</a></dt>
<dd><p>如果 <em>year</em> 是闰年则返回  <a class="reference internal" href="constants.html#True" title="True"><code class="xref py py-const docutils literal notranslate"><span class="pre">True</span></code></a> ,否则返回 <a class="reference internal" href="constants.html#False" title="False"><code class="xref py py-const docutils literal notranslate"><span class="pre">False</span></code></a>。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.leapdays">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">leapdays</code><span class="sig-paren">(</span><em class="sig-param">y1</em>, <em class="sig-param">y2</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.leapdays" title="永久链接至目标">¶</a></dt>
<dd><p>返回在范围 <em>y1</em> 至 <em>y2</em> （包含 y1 和 y2 ）之间的闰年的年数，其中 <em>y1</em> 和 <em>y2</em> 是年份。</p>
<p>此函数适用于跨越一个世纪变化的范围。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.weekday">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">weekday</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em>, <em class="sig-param">day</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.weekday" title="永久链接至目标">¶</a></dt>
<dd><p>返回一周中的某一天 （ <code class="docutils literal notranslate"><span class="pre">0</span></code> 是周一） 以年（ <code class="docutils literal notranslate"><span class="pre">1970</span></code> -- ...），月（ <code class="docutils literal notranslate"><span class="pre">1</span></code> -- <code class="docutils literal notranslate"><span class="pre">12</span></code> ），日（ <code class="docutils literal notranslate"><span class="pre">1</span></code> -- <code class="docutils literal notranslate"><span class="pre">31</span></code> ）的格式。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.weekheader">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">weekheader</code><span class="sig-paren">(</span><em class="sig-param">n</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.weekheader" title="永久链接至目标">¶</a></dt>
<dd><p>返回一个包含星期几的缩写名的头。 <em>n</em> 指定星期几缩写的字符宽度。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.monthrange">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">monthrange</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.monthrange" title="永久链接至目标">¶</a></dt>
<dd><p>返回指定年份的指定月份第一天是星期几和这个月的天数。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.monthcalendar">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">monthcalendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">month</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.monthcalendar" title="永久链接至目标">¶</a></dt>
<dd><p>返回表示一个月的日历的矩阵。 每一行代表一周；此月份外的日子由零表示。 每周从周一开始，除非使用 <a class="reference internal" href="#calendar.setfirstweekday" title="calendar.setfirstweekday"><code class="xref py py-func docutils literal notranslate"><span class="pre">setfirstweekday()</span></code></a> 改变设置。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.prmonth">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">prmonth</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">themonth</em>, <em class="sig-param">w=0</em>, <em class="sig-param">l=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.prmonth" title="永久链接至目标">¶</a></dt>
<dd><p>打印由 <a class="reference internal" href="#calendar.month" title="calendar.month"><code class="xref py py-func docutils literal notranslate"><span class="pre">month()</span></code></a> 返回的一个月的日历。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.month">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">month</code><span class="sig-paren">(</span><em class="sig-param">theyear</em>, <em class="sig-param">themonth</em>, <em class="sig-param">w=0</em>, <em class="sig-param">l=0</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.month" title="永久链接至目标">¶</a></dt>
<dd><p>使用 <a class="reference internal" href="#calendar.TextCalendar" title="calendar.TextCalendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">TextCalendar</span></code></a> 类的 <code class="xref py py-meth docutils literal notranslate"><span class="pre">formatmonth()</span></code> 以多行字符串形式返回月份日历。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.prcal">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">prcal</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">w=0</em>, <em class="sig-param">l=0</em>, <em class="sig-param">c=6</em>, <em class="sig-param">m=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.prcal" title="永久链接至目标">¶</a></dt>
<dd><p>打印由 <a class="reference internal" href="#module-calendar" title="calendar: Functions for working with calendars, including some emulation of the Unix cal program."><code class="xref py py-func docutils literal notranslate"><span class="pre">calendar()</span></code></a> 返回的整年的日历。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.calendar">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">calendar</code><span class="sig-paren">(</span><em class="sig-param">year</em>, <em class="sig-param">w=2</em>, <em class="sig-param">l=1</em>, <em class="sig-param">c=6</em>, <em class="sig-param">m=3</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.calendar" title="永久链接至目标">¶</a></dt>
<dd><p>使用 <a class="reference internal" href="#calendar.TextCalendar" title="calendar.TextCalendar"><code class="xref py py-class docutils literal notranslate"><span class="pre">TextCalendar</span></code></a> 类的 <code class="xref py py-meth docutils literal notranslate"><span class="pre">formatyear()</span></code> 返回整年的三列的日历以多行字符串的形式。</p>
</dd></dl>

<dl class="function">
<dt id="calendar.timegm">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">timegm</code><span class="sig-paren">(</span><em class="sig-param">tuple</em><span class="sig-paren">)</span><a class="headerlink" href="#calendar.timegm" title="永久链接至目标">¶</a></dt>
<dd><p>一个不相关但很好用的函数，它接受一个时间元组例如 <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><code class="xref py py-mod docutils literal notranslate"><span class="pre">time</span></code></a> 模块中的 <a class="reference internal" href="time.html#time.gmtime" title="time.gmtime"><code class="xref py py-func docutils literal notranslate"><span class="pre">gmtime()</span></code></a> 函数的返回并返回相应的 Unix 时间戳，假定 1970 年开始计数， POSIX 编码。实际上， <a class="reference internal" href="time.html#time.gmtime" title="time.gmtime"><code class="xref py py-func docutils literal notranslate"><span class="pre">time.gmtime()</span></code></a> 和 <a class="reference internal" href="#calendar.timegm" title="calendar.timegm"><code class="xref py py-func docutils literal notranslate"><span class="pre">timegm()</span></code></a> 是彼此相反的。</p>
</dd></dl>

<p><a class="reference internal" href="#module-calendar" title="calendar: Functions for working with calendars, including some emulation of the Unix cal program."><code class="xref py py-mod docutils literal notranslate"><span class="pre">calendar</span></code></a> 模块导出以下数据属性：</p>
<dl class="data">
<dt id="calendar.day_name">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">day_name</code><a class="headerlink" href="#calendar.day_name" title="永久链接至目标">¶</a></dt>
<dd><p>在当前的语言环境下表示星期几。</p>
</dd></dl>

<dl class="data">
<dt id="calendar.day_abbr">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">day_abbr</code><a class="headerlink" href="#calendar.day_abbr" title="永久链接至目标">¶</a></dt>
<dd><p>在当前语言环境下表示星期几缩写的数组。</p>
</dd></dl>

<dl class="data">
<dt id="calendar.month_name">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">month_name</code><a class="headerlink" href="#calendar.month_name" title="永久链接至目标">¶</a></dt>
<dd><p>在当前语言环境下表示一年中月份的数组。这遵循一月的月号为 1 的通常惯例，所以它的长度为 13 且 <code class="docutils literal notranslate"><span class="pre">month_name[0]</span></code> 是空字符串。</p>
</dd></dl>

<dl class="data">
<dt id="calendar.month_abbr">
<code class="sig-prename descclassname">calendar.</code><code class="sig-name descname">month_abbr</code><a class="headerlink" href="#calendar.month_abbr" title="永久链接至目标">¶</a></dt>
<dd><p>在当前语言环境下表示月份简写的数组。这遵循一月的月号为 1 的通常惯例，所以它的长度为 13 且 <code class="docutils literal notranslate"><span class="pre">month_abbr[0]</span></code> 是空字符串。</p>
</dd></dl>

<div class="admonition seealso">
<p class="admonition-title">参见</p>
<dl class="simple">
<dt>模块 <a class="reference internal" href="datetime.html#module-datetime" title="datetime: Basic date and time types."><code class="xref py py-mod docutils literal notranslate"><span class="pre">datetime</span></code></a></dt><dd><p>为日期和时间提供与 <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><code class="xref py py-mod docutils literal notranslate"><span class="pre">time</span></code></a> 模块相似功能的面向对象接口。</p>
</dd>
<dt>模块 <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><code class="xref py py-mod docutils literal notranslate"><span class="pre">time</span></code></a></dt><dd><p>底层时间相关函数。</p>
</dd>
</dl>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>上一个主题</h4>
  <p class="topless"><a href="datetime.html"
                        title="上一章"><code class="xref py py-mod docutils literal notranslate"><span class="pre">datetime</span></code> --- 基本的日期和时间类型</a></p>
  <h4>下一个主题</h4>
  <p class="topless"><a href="collections.html"
                        title="下一章"><code class="xref py py-mod docutils literal notranslate"><span class="pre">collections</span></code> --- 容器数据类型</a></p>
  <div role="note" aria-label="source link">
    <h3>本页</h3>
    <ul class="this-page-menu">
      <li><a href="../bugs.html">提交 Bug</a></li>
      <li>
        <a href="https://github.com/python/cpython/blob/3.7/Doc/library/calendar.rst"
            rel="nofollow">显示源代码
        </a>
      </li>
    </ul>
  </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>导航</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="总目录"
             >索引</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python 模块索引"
             >模块</a> |</li>
        <li class="right" >
          <a href="collections.html" title="collections --- 容器数据类型"
             >下一页</a> |</li>
        <li class="right" >
          <a href="datetime.html" title="datetime --- 基本的日期和时间类型"
             >上一页</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">3.7.8 Documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >Python 标准库</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="datatypes.html" >数据类型</a> &#187;</li>
    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="快速搜索" type="text" name="q" />
          <input type="submit" value="转向" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">版权所有</a> 2001-2020, Python Software Foundation.
    <br />
    Python 软件基金会是一个非盈利组织。
    <a href="https://www.python.org/psf/donations/">请捐助。</a>
    <br />
    最后更新于 6月 29, 2020.
    <a href="../bugs.html">发现了问题</a>？
    <br />
    使用<a href="http://sphinx.pocoo.org/">Sphinx</a>2.3.1 创建。
    </div>

  </body>
</html>